package com.cy.sports.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author Garne
 * @since 2021-05-01
 */
public class TUser extends Model<TUser> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    private String account;

    private String password;

    @TableField(exist = false)
    private String newPassword;

    @TableField("`name`")
    private String name;

    private String nickname;

    private Integer sex;

    private String address;

    /**
     * 0:税务局,1:员工,2:管理员,3:企业
     */
    private Integer role;

    @TableField("createTime")
    private LocalDateTime createTime;

    @TableField("updateTime")
    private LocalDateTime updateTime;

    @TableField("lastLoginTime")
    private LocalDateTime lastLoginTime;

    /**
     * 0:待审核  1:审核通过
     */
    private Integer status;

    public Integer getId() {
        return id;
    }

    public TUser setId(Integer id) {
        this.id = id;
        return this;
    }
    public String getAccount() {
        return account;
    }

    public TUser setAccount(String account) {
        this.account = account;
        return this;
    }
    public String getPassword() {
        return password;
    }

    public TUser setPassword(String password) {
        this.password = password;
        return this;
    }
    public String getName() {
        return name;
    }

    public TUser setName(String name) {
        this.name = name;
        return this;
    }
    public String getNickname() {
        return nickname;
    }

    public TUser setNickname(String nickname) {
        this.nickname = nickname;
        return this;
    }
    public Integer getSex() {
        return sex;
    }

    public TUser setSex(Integer sex) {
        this.sex = sex;
        return this;
    }
    public String getAddress() {
        return address;
    }

    public TUser setAddress(String address) {
        this.address = address;
        return this;
    }
    public Integer getRole() {
        return role;
    }

    public TUser setRole(Integer role) {
        this.role = role;
        return this;
    }
    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public TUser setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
        return this;
    }
    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    public TUser setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
        return this;
    }
    public LocalDateTime getLastLoginTime() {
        return lastLoginTime;
    }

    public TUser setLastLoginTime(LocalDateTime lastLoginTime) {
        this.lastLoginTime = lastLoginTime;
        return this;
    }

    public Integer getStatus() {
        return status;
    }

    public TUser setStatus(Integer status) {
        this.status = status;
        return this;
    }

    public String getNewPassword() {
        return newPassword;
    }

    public TUser setNewPassword(String newPassword) {
        this.newPassword = newPassword;
        return this;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "TUser{" +
                "id=" + id +
                ", account='" + account + '\'' +
                ", password='" + password + '\'' +
                ", name='" + name + '\'' +
                ", nickname='" + nickname + '\'' +
                ", sex=" + sex +
                ", address='" + address + '\'' +
                ", role=" + role +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                ", lastLoginTime=" + lastLoginTime +
                ", status=" + status +
                '}';
    }
}
